Flush any outstanding stuff in the window in non-buffered get_internal_paint_info...
authorAlexander Larsson <alex@localhost.localdomain>
Thu, 22 Jan 2009 19:46:08 +0000 (20:46 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:25 +0000 (10:15 +0200)
We return the raw window drawable, so its likely the app will do some
weird stuff to it, like draw using non-gdk operations. We don't want
the app to see any half-drawn state, so flush everything.

This fixes a scroll issue in firefox at least.

gdk/gdkwindow.c

index cc0765d1fc3c72ba3d285d858d4cb738adb97b47..b63d8f6a43c0b668f3758b742358c4b34b213239 100644 (file)
@@ -2716,7 +2716,12 @@ gdk_window_get_internal_paint_info (GdkWindow    *window,
          *real_drawable = paint->pixmap;
        }
       else
-       *real_drawable = window;
+       {
+         /* This means you're probably gonna be doing some weird shit
+            directly to the window, so we flush all outstanding stuff */
+         gdk_window_flush (window);
+         *real_drawable = window;
+       }
     }
 
   gdk_window_get_offsets (window, &x_off, &y_off);